import request from '@/utils/request'
import req from '@/utils/req'

// 发送验证码
// export const sendSms = mobile => {
//   return request({
//     method: 'GET',
//     url: `/user/${mobile}`
//   })
// }

// 登录
export const login = data => {
  return request({
    method: 'POST',
    url: '/user/login',
    data
  })
}

// 获取用户信息
// export const getUserInfo = () => {
//   return request({
//     method: 'GET',
//     url: '/question/test2'
//   })
// }

// 学习记录
export const student = data => {
  return request({
    method: 'POST',
    url: '/Testpaper/selUserTestPaper',
    data
  })
}

// 家长注册
export const parent = data => {
  return req({
    method: 'POST',
    url: '/userparent/userparent/register',
    data
  })
}

// 家长登陆
export const parentDeng = data => {
  return req({
    method: 'POST',
    url: '/userparent/userparent/login',
    data
  })
}

// 上传图片修改头像
export const photo = data => {
  return req({
    method: 'POST',
    url: '/userparent/userparent/parentimgupl',
    data
  })
}
// 老师的连接
export const newteacher = data => {
  return request({
    method: 'POST',
    url: '/user/nowclass',
    data
  })
}

// 登陆
export const info = data => {
  return req({
    method: 'POST',
    url: '/userparent/userparent/loginresult',
    data
  })
}

// 答案开关
export const kaiguan = data => {
  return req({
    method: 'POST',
    url: '/userparent/userparent/setParentinfo',
    data
  })
}
